#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>
int main()
{
	int a, n;
	scanf("%d%d", &a, &n);

	if (a <= 0 || a >= 10 || n <= 0)
	{
		printf("-1\n");
		return 0;
	}

	int sum = 0;
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j <= i; j++)
		{
			sum += a * pow(10, j);
		}
	}

	printf("%d\n", sum);
	return 0;
}